package com.supertool.tong.merger.util;

import java.io.IOException;

import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.util.*;
import org.apache.hadoop.mapreduce.*;
import org.apache.hadoop.mapreduce.RecordReader;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.input.FileSplit;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
public class MzSequenceFileInputFormat extends FileInputFormat<LongWritable,Text> {

    protected boolean isSplitable(JobContext job, Path file) {
        return false;
    }

    public RecordReader<LongWritable,Text> createRecordReader(InputSplit split,
                                                              TaskAttemptContext context)
            throws IOException {
        return new MzSequenceFileRecordReader(context.getConfiguration(), (FileSplit) split);//Configuration conf, FileSplit split
    }
}
